<html>
<head>
	<title></title>
	<script type="text/javascript">
	
	var name = prompt("input your name:");
	document.write("hello " + name);

	function confirm_it() {
		if (confirm("Are you sure?")) {
			document.test.submit();
		};
	}
	</script>
</head>
<body>
	<form name="test" action="1.html" method="post">
		<input type="button" value="delete the file" onclick="confirm_it()" name="tt">
	</form>

	<script type="text/javascript">

	var a = new Array("alex","mark","sean","victor","lynn");

	for(var i in a) {
		document.write(i+"----");
		document.write(a[i] + "<br/>");
	}
	/*调用共有document对象*/
	with(document) {
		write("This is a default document action");
		write("<br>");
		write("font color=\"red\" <br/>");
	}

	var today = new Date();
	document.write("today's date:" + today.getDate() + "<br/>");
	</script>


	<input type="text" onclick="checkit(this)">
</body>
</html>

<script type="text/javascript">
function checkit(obj) {
	if (obj.value == "") 
		alert("Null");
	else 
		alert(obj.value + " \ntotal length:" + obj.value.length)
}
</script>